<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>新增用户</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
#@css?("layui")
</head>
<body>
	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 50px;">
		<legend>文章编辑</legend>
	</fieldset>

	<form method="POST" action="#(ctx)/admin/industry/update"
		class="layui-form">
		<input type="hidden" name="industry.id" value="#(industry.id??)" /> <input
			type="hidden" name="industry.type" value="#(industry.type??)" />
		<div class="layui-form-item">
			<label class="layui-form-label">标题</label>
			<div class="layui-input-block">
				<input type="text" name="industry.title" lay-verify="required"
					placeholder="请输入标题" autocomplete="off" class="layui-input"
					value="#(industry.title??)">
			</div>
		</div>
		<div class="layui-form-item ">
			<label class="layui-form-label">发布日期</label>
			<div class="layui-input-inline">
				<input type="text" name="industry.indate" id="indate"
					lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off"
					class="layui-input" value="#date(industry.indate,'yyyy-MM-dd')">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">内容</label>
			<div class="layui-input-block">
				<textarea class="layui-textarea" name="industry.content" id="content" > #(industry.content??)
       			 </textarea>
			</div>
			<script type="text/javascript"
				src="#(ctx)/static/kindeditor/kindeditor-all-min.js"></script>
			<script type="text/javascript"
				src="#(ctx)/static/kindeditor/lang/zh-CN.js"></script>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn layui-btn-normal" lay-submit=""
					lay-filter="formSub">立即提交</button>
			</div>
		</div>
	</form>
</body>

#@js?("layui")
<script>
	layui.use([ 'form', 'laydate','layer','jquery' ],function() {
		var  form = layui.form, laydate = layui.laydate,layer = layui.layer,$=layui.jquery;
		//日期
		laydate.render({
			elem : '#indate'
		});
		#if(msg??)
		layer.msg("#(msg)");
		#end
	});
	
	var options = {
			width : '100%',
			height : '300px',
			filterMode : false,
			afterBlur : function() {
				this.sync();
			},
			resizeType : 1,
			shadowMode : false,
			allowPreviewEmoticons : false,
			allowUpload : true, //允许上传图片
			allowImageUpload : true,
			uploadJson : '#(ctx)/upload/uploadImg'//上传路径
	};
	KindEditor.ready(function(K) {
		debugger;
		window.editor = K.create('#content', options);
	});
</script>
</html>